package com.dailyblue.project.estate.owner.controller;

import com.dailyblue.project.estate.commons.bean.Owner;
import com.dailyblue.project.estate.commons.util.JsonResult;
import com.dailyblue.project.estate.owner.service.OwnerService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/owner")
public class OwnerController {
    @Resource
    private OwnerService ownerService;

    @GetMapping("/{id}")
    public JsonResult<Owner> findOwnerById(@PathVariable("id") String id){
        return ownerService.findOwnerById(id);
    }
}
